<template>
	<view class="item-box" @click="goProduct(item)">
		<view class="left-icon">
			<image src="../../static/images/develop/headimg.png" mode=""></image>
		</view>
		<view class="right-box">
			<view class="title">
				{{ item.name }}
			</view>
			<view class="company-info">
				<view class="info-left">
					<view class="grade-icon">
						<image src="../../static/images/common/grade-icon.png" mode=""></image>
					</view>
					4.0
					<view class="text">
						销量：
					</view>
					8888
				</view>
				<view class="info-right">
					<view class="address-icon">
						<image src="../../static/images/home/location.png" mode=""></image>
					</view>
					6.5公里
				</view>
			</view>
			<view class="company-text">
				主营建材类商品，主营建材类商品主营建材类商品主营建材类商品主营建商品主营品主营建商品主品主营建商品主...
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			item: {
				type: Object,
				default: {}
			}
		},
		data(){
			return{
				goProduct(item){
					this.$u.route({
						url: 'pages/buildingmaterials/materials/index',
						params: {
							title: item.name
						}
					})
				}
			}
		},
		methods:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.item-box{
		width: 100%;
		padding-bottom: 30rpx;
		margin-top: 30rpx;
		border-bottom: 1rpx solid rgba(223,223,223,1);
		display: flex;
		.left-icon{
			width:140rpx;
			height:120rpx;
			border-radius:10rpx;
			image{
				width:140rpx;
				height:120rpx;
				border-radius:10rpx;
			}
		}
		.right-box{
			flex: 1;
			width: 100%;
			margin-left: 16rpx;
			.title{
				font-size:32rpx;
				font-weight:bold;
				line-height:43rpx;
				color:rgba(51,51,51,1);
				opacity:1;
			}
			.company-info{
				width: 100%;
				margin-top: 16rpx;
				display: flex;
				justify-content: space-between;
				font-size:26rpx;
				font-weight:bold;
				line-height:35rpx;
				color:rgba(51,51,51,1);
				opacity:1;
				.info-left{
					display: flex;
					.grade-icon{
						margin-right: 14rpx;
						width: 28rpx;
						height: 26rpx;
						margin-top: 4rpx;
						image{
							width: 28rpx;
							height: 26rpx;
						}
					}
					.text{
						font-size:22rpx;
						font-weight:bold;
						color:rgba(153,153,153,1);
						opacity:1;
						margin-left: 44rpx;
					}
				}
				.info-right{
					display: flex;
					.address-icon{
						margin-right: 18rpx;
						width: 21rpx;
						height: 30rpx;
						image{
							width: 21rpx;
							height: 30rpx;
						}
					}
				}
			}
			.company-text{
				margin-top: 26rpx;
				width: 100%;
				font-size:24rpx;
				font-weight:400;
				line-height:32rpx;
				color:rgba(51,51,51,1);
				opacity:1;
				text-overflow: -o-ellipsis-lastline;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				line-clamp: 2;
				-webkit-box-orient: vertical;
			}
		}
	}
</style>
